Skip to content

Conversation

@randomm
Copy link
Owner

@randomm randomm commented Jan 26, 2026

Summary

Implements comprehensive UI components for the oclite task panel interface, including task display, activity status, and system information.

Changes

  • Task Panel (taskpanel.ts): Main task display component with status icons and task listing
  • Status Line (statusline.ts): Activity status display showing current operations
  • Bottom Bar (bottombar.ts): System information bar displaying permissions and file counts
  • Enhanced Task Handler (task.ts): Updated with improved task limit (5 → 10 concurrent tasks)

Security

✅ ANSI injection protection for all user-visible output
✅ Input validation on all data sources
✅ Safe string rendering with escape sequences

Testing

  • Unit tests for statusline component
  • Type safety verified with bun run typecheck
  • All changes pass CI pipeline

Fixes

Related Issues

Task limit increased from 5 to 10 for better concurrent task handling.

randomm and others added 14 commits January 26, 2026 15:03
)

* feat: simplify agentic loop and fix critical bugs

This PR implements a major refactor and stability overhaul for the agentic loop.

Completed Issues:
- Fixes #5: Memory leak in fire-and-forget promises (implemented BackgroundTasks tracking)
- Fixes #6: Split oversized prompt.ts (extracted session/tools.ts)
- Fixes #7: Add BackgroundTasks test suite
- Fixes #8: Fix silent tool failure in background (added result tracking and events)
- Fixes #9: Add Stream module unit tests (comprehensive coverage)
- Fixes #10: Fix race condition in Remory search (added request tracking)
- Fixes #11: Fix unhandled abort during stream cleanup
- Fixes #12: Implement check_task tool
- Fixes #13: Add config schema validation
- Fixes #14: Upgrade Remory to Unix socket (implemented in socket-client.ts)
- Fixes #16: Fix code style violations

Changes:
- Extracted tool resolution logic to `src/session/tools.ts`
- Implemented `BackgroundTasks` utility for promise tracking
- Added `check_task` tool for polling background tasks
- Upgraded Remory client to use Unix sockets and JSON-RPC
- Added comprehensive tests for Stream and BackgroundTasks

* feat: auto-wakeup agent context and build fixes

* chore: clean up workflows for independent fork

- Remove upstream publishing workflows (npm, vscode, tauri, etc.)
- Change branch references from dev to main
- Keep test, typecheck, and issue management workflows

* docs: replace README with oclite fork documentation

- Add attribution to upstream OpenCode project (MIT requirement)
- Document build-from-source installation
- Explain philosophy: opinionated defaults, agentic workflows, remory integration
- List differences from upstream (no desktop app, VS Code, npm publishing)
- Keep it concise and focused on single developer use case

* docs: add README and release workflow for independent fork

- New README with installation, philosophy, attribution
- GitHub Actions workflow for building/releasing binaries
- Closes #23, closes #24

* feat: lazy load AI SDKs and fix typecheck errors

- Convert 21 AI provider imports to dynamic imports
- Add null checks in github.ts
- Fix task.ts and test type definitions
- Enable minification in build
- Improve TUI activity streaming

* fix: use git toplevel for worktree path (#31)

* fix(session): prevent orphaned task slots blocking allocation (#33)

- Store release_slot callback in TaskMetadata for lifecycle tracking
- Release slot in trackBackgroundTask finally block (handles timeout/crash/abort)
- Fix double-release race in task.ts with slotReleased guard
- Release slot before metadata deletion in cancelBackgroundTask
- Simplify cleanupAllTaskSlots to prevent race with finally blocks
- Add comprehensive AGENTS.md aligned with project standards (#34)

Closes #33
Closes #34

* fix(tool): correct CheckTask error handling and test context

- Use try/catch instead of Promise chaining for Session.get errors
- Add sessionID to test context for proper caller identification

* chore(ci): simplify workflows to essential test suite only

Remove inherited upstream workflows. Keep only basic CI for typecheck and tests.

* fix(ci): run tests from packages/opencode directory

* fix(ci): run tests from correct directory

Previously the ci.yml had incorrect working directory placement,
causing tests to run from root which exits with error code 1.
- Create log directory before tests
- Configure git user for CI
- Sanitize null bytes from log paths
…37) (#38)

- Read file directly in set()/remove() instead of calling all()
- Eliminates nested lock acquisition deadlock
- Maintains file locking for cross-call synchronization
- Validates data with Info.safeParse() on read
* fix(auth): prevent deadlock and race condition in credential storage (#37)

- Read file directly in set()/remove() instead of calling all()
- Eliminates nested lock acquisition deadlock
- Maintains file locking for cross-call synchronization
- Validates data with Info.safeParse() on read

* fix(ui): prevent subagent status line flicker (#36)

- Add createEffect to sync child session data on Task mount
- Ensures activity data available before first render
- Eliminates layout jumping when multiple agents run

* fix(ui): add error handling to child session sync
- Add abort check after retry sleep to prevent infinite loop
- Check abort before and after snapshot patch
- Log warning when cleanup interrupted mid-loop
- Move completed time inside abort check
- Add logging for aborted sleep
- Remove packages/desktop/ directory entirely
- Reduces project complexity
- Focus on CLI/TUI, web app, and server modes
GlobTool was accidentally removed in commit b1f770a. Agents need glob
for file discovery. This restores the import and registration.
- New RgTool with two modes: content search and file listing
- files_only=true lists files matching glob pattern
- Default mode searches file contents with regex
- Removes old GrepTool and GlobTool
- Adds ripgrep as required dependency in README
)

* fix(opencode): fix task auto-notification and remove any types

- Fix critical bug: task completion events now route to parent session
  (changed session_id: session.id to session_id: ctx.sessionID in task.ts)
- Remove 'any' type annotations from catch blocks
- Replace e?.name checks with proper type guards for AbortError
- Convert Global paths to getters for test isolation
- Fix log directory initialization order
- Clean up Tauri dependencies from lock file

* fix(project): use fs.stat instead of Bun.file for directory detection

Bun.file().stat() throws "Directories cannot be read like files" when
called on a directory. The .git path is a directory in normal repos
(only a file in worktrees). Using Node.js fs.stat() works correctly
with both.

Also fixed stat.isFile to stat.isFile() (method call vs property).

* feat(opencode): add lightweight TUI (oclite) with raw ANSI terminal (#27)

* fix(tool): inherit parent session directory in subagents (#50)

* fix(provider): add comprehensive null checks in auth.ts (#52)

* feat(cli): add task icons with color coding (#21)

* feat(cli): add metrics formatting utilities (#20)

* fix(project): handle empty commits and worktree path resolution
@github-actions
Copy link

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

, #95, #96)

- Show spinner immediately for custom commands before blocking work
- Add elapsed time ticker for running subagent tasks
- Show nested child tool status below running tasks
- Add theme-based color coding (completed tools dimmed, tasks cyan)
- Fix memory leaks in Bus subscription and task tracking maps
…ovide

- Add await before input.fn() to keep Promise within context.provide scope
- Fix type signatures: fn: () => Promise<R>, init?: () => Promise<void>
- Update call sites in worktree and tests to use async functions

Fixes startup crash: "No context found for instance"
…load crash

State.create() was eagerly evaluating root() at module import time,
but root() calls Instance.directory which requires AsyncLocalStorage
context. This caused "No context found for instance" crashes.

Now root() is only called when the returned factory function is
invoked, which happens inside Instance.provide() context.
style.dim alone wasn't rendering visibly. Tools now show:
- Completed: green icon + dim gray text
- Running: yellow icon + dim gray text
- Error: red icon + red text
#102)

- Flush line buffer with newline before tool_start to prevent inline rendering
- Reuse tool ID for repeated calls, show (×N) counter instead of spam
- Todos hidden by default, show '(N tasks - ctrl+t to show)' indicator
- Press ctrl+t to toggle full todo list with icons and priorities
- Centralized state in liveblock to prevent desync after reset
- Added toggleTasksVisible() and getTasksVisible() methods
…#100)

- Auto-search relevant memories before task dispatch
- Auto-store task outcomes on successful completion
- Graceful fallback when remory unavailable (TTL-cached availability)
- Metadata serialized into text content for searchability
- Empty description validation prevents unnecessary searches
- Removed unused remory_persist_thinking config stub
- Show init progress: "Loading plugins" → "Loading providers" → etc.
- Fix task rendering: tasks now show inline with other tools
- Fix taskToChildSession memory leak: clear on stream reset
- Remove premature taskToChildSession.delete() that broke child tool routing
Previously showed all possible models (300-1000+) filling the screen.
Now only shows models from providers with API keys configured.
…104)

- Add red ✗ visual for permission-denied tools with '(permission denied)' suffix
- Fix subagent output timing: populate taskToChildSession at tool_start
- Fix 7 failing tests: add missing provider key to mocks
- Add type-safe validation for error, sessionId, agent, description fields
- Extract PERMISSION_DENIED_PATTERN constant with case-insensitive regex
- Remove duplicate child session extraction from tool_end
- Change rg tool to use single 'rg' permission instead of 'glob'/'grep'
- Update TOOL display mappings in github.ts and run.ts
- Update explore agent and ACP agent permission configs
- Add legacy migration for existing glob/grep configs
- Update Permission schema in config.ts
- Update all related tests

One tool = one permission. Simpler, more intuitive.
#109)

- Add auto-wakeup: enable Session.enableAutoWakeup() when session starts
- Fix child session linking: use Bus subscription only (remove race condition)
- Fix memory leak: clear maps on Esc cancel and streamResponse start
- Add partIdToToolId map to track tool callIDs for metadata updates

Users now see task progress immediately and results auto-deliver on completion.
- Replace shell-based realpath with fs/promises realpath (security fix)
- Remove static directory placeholders from bash tool description
- Directory info now comes only from system prompt (dynamic per session)

Prevents subagents from hallucinating parent session's working directory.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant